﻿<!--
    <copyright file="QUT.Bio/SilverMap/Theme.xaml" company="Queensland University of Technology">
        Copyright (C) 2010 Queensland University of Technology. All rights reserved.
    </copyright>
    
    This work is licensed for use under the terms of the Microsoft Public 
    License (Ms-PL), available at http://www.microsoft.com/opensource/licenses.mspx.

-->
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <ControlTemplate x:Key="TextBoxTemplate"
                     TargetType="TextBox">
        <!--<ControlTemplate.Resources>
            <Storyboard x:Key="HoverOn">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="HoverBorder"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                          Value="1" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="HoverOff">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="HoverBorder"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                          Value="0" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="FocusedOn">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="FocusVisualElement"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                          Value="1" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
            <Storyboard x:Key="FocusedOff">
                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                               Storyboard.TargetName="FocusVisualElement"
                                               Storyboard.TargetProperty="(UIElement.Opacity)">
                    <SplineDoubleKeyFrame KeyTime="00:00:00.3000000"
                                          Value="0" />
                </DoubleAnimationUsingKeyFrames>
            </Storyboard>
        </ControlTemplate.Resources>-->
        <Grid>
            <Border x:Name="Border"
                    Opacity="1"
                    Background="{TemplateBinding Background}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="2,2,2,2">
                <Grid>
                    <Border BorderThickness="1"
                            CornerRadius="1,1,1,1">
                        <Border.BorderBrush>
                            <SolidColorBrush Color="Transparent"
                                             x:Name="MouseOverColor" />
                        </Border.BorderBrush>
                        <ScrollViewer Margin="0"
                                      x:Name="PART_ContentHost"
                                      Background="{TemplateBinding Background}" />
                    </Border>
                </Grid>
            </Border>
            <Border x:Name="HoverBorder"
                    Opacity="0"
                    BorderBrush="{StaticResource NormalBrush}"
                    BorderThickness="2,2,2,2"
                    CornerRadius="2,2,2,2" />
            <Border x:Name="DisabledVisualElement"
                    IsHitTestVisible="False"
                    Opacity="0"
                    Background="#FFFFFFFF"
                    BorderBrush="#A5F7F7F7"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    CornerRadius="2,2,2,2" />
            <Border x:Name="FocusVisualElement"
                    IsHitTestVisible="False"
                    Opacity="0"
                    BorderBrush="{StaticResource NormalBrush}"
                    BorderThickness="2.1,2.1,2.1,2.1"
                    CornerRadius="0.2,0.2,0.2,0.2" />
        </Grid>

        <!--<ControlTemplate.Triggers>
            <Trigger Property="IsFocused"
                     Value="True">
                <Trigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource FocusedOff}"
                                     x:Name="FocusedOff_BeginStoryboard" />
                </Trigger.ExitActions>
                <Trigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource FocusedOn}"
                                     x:Name="FocusedOn_BeginStoryboard" />
                </Trigger.EnterActions>
            </Trigger>
            <MultiTrigger>
                <MultiTrigger.ExitActions>
                    <BeginStoryboard Storyboard="{StaticResource HoverOff}"
                                     x:Name="HoverOff_BeginStoryboard" />
                </MultiTrigger.ExitActions>
                <MultiTrigger.EnterActions>
                    <BeginStoryboard Storyboard="{StaticResource HoverOn}" />
                </MultiTrigger.EnterActions>
                <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver"
                               Value="True" />
                    <Condition Property="IsFocused"
                               Value="False" />
                </MultiTrigger.Conditions>
            </MultiTrigger>
            <Trigger Property="IsEnabled"
                     Value="False">
                <Setter Property="Background"
                        Value="{DynamicResource DisabledBackgroundBrush}"
                        TargetName="Border" />
                <Setter Property="BorderBrush"
                        Value="{DynamicResource DisabledBackgroundBrush}"
                        TargetName="Border" />
                <Setter Property="Foreground"
                        Value="{DynamicResource DisabledForegroundBrush}" />
            </Trigger>
        </ControlTemplate.Triggers>-->

    </ControlTemplate>

    <!-- Color Resources -->

    <Color x:Key="BlackColor">#FF000000</Color>
    <Color x:Key="WhiteColor">#FFFFFFFF</Color>

    <SolidColorBrush x:Key="TextBrush"
                     Color="#FFFFFFFF" />

    <Color x:Key="NormalBrushGradient1">#FFBAE4FF</Color>
    <Color x:Key="NormalBrushGradient2">#FF398FDF</Color>
    <Color x:Key="NormalBrushGradient3">#FF006DD4</Color>
    <Color x:Key="NormalBrushGradient4">#FF0A3E69</Color>

    <Color x:Key="NormalBorderBrushGradient1">#FFBBBBBB</Color>
    <Color x:Key="NormalBorderBrushGradient2">#FF737373</Color>
    <Color x:Key="NormalBorderBrushGradient3">#FF646464</Color>
    <Color x:Key="NormalBorderBrushGradient4">#FF000000</Color>

    <Color x:Key="SelectedBackgroundGradient1">#FFBBBBBB</Color>
    <Color x:Key="SelectedBackgroundGradient2">#FF737373</Color>
    <Color x:Key="SelectedBackgroundGradient3">#FF646464</Color>
    <Color x:Key="SelectedBackgroundGradient4">#FFA1A1A1</Color>

    <Color x:Key="SliderBorderGradient1">#FF3F3F3F</Color>
    <Color x:Key="SliderBorderGradient2">#FFADADAD</Color>

    <Color x:Key="ShadeBrushGradient1">#FF62676A</Color>
    <Color x:Key="ShadeBrushGradient2">#FFD1D4D6</Color>
    <Color x:Key="ShadeBrushGradient3">#FFFFFFFF</Color>

    <Color x:Key="WindowBackgroundBrushGradient1">#FFD1D1D1</Color>
    <Color x:Key="WindowBackgroundBrushGradient2">#FF8496AA</Color>

    <LinearGradientBrush x:Key="NormalBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="{StaticResource NormalBrushGradient1}"
                      Offset="0" />
        <GradientStop Color="{StaticResource NormalBrushGradient2}"
                      Offset="0.41800001263618469" />
        <GradientStop Color="{StaticResource NormalBrushGradient3}"
                      Offset="0.418" />
        <GradientStop Color="{StaticResource NormalBrushGradient4}"
                      Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="NormalBorderBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="{StaticResource NormalBorderBrushGradient1}" />
        <GradientStop Color="{StaticResource NormalBorderBrushGradient2}"
                      Offset="0.38" />
        <GradientStop Color="{StaticResource NormalBorderBrushGradient3}"
                      Offset="0.384" />
        <GradientStop Color="{StaticResource NormalBorderBrushGradient4}"
                      Offset="1" />
    </LinearGradientBrush>

    <RadialGradientBrush x:Key="HoverBrush">
        <RadialGradientBrush.RelativeTransform>
            <TransformGroup>
                <ScaleTransform CenterX="0.5"
                                CenterY="0.5"
                                ScaleX="1.804"
                                ScaleY="0.743" />
                <SkewTransform CenterX="0.5"
                               CenterY="0.5" />
                <RotateTransform CenterX="0.5"
                                 CenterY="0.5" />
                <TranslateTransform Y="0.47999998927116394" />
            </TransformGroup>
        </RadialGradientBrush.RelativeTransform>
        <GradientStop Color="#FF98DAFF"
                      Offset="0.209" />
        <GradientStop Color="#0098DAFF"
                      Offset="1" />
        <GradientStop Color="#FFFFFFFF"
                      Offset="0" />
    </RadialGradientBrush>

    <LinearGradientBrush x:Key="CheckIconBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="#FF006CD1" />
        <GradientStop Color="#FFA5D6F9"
                      Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="ShadeBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="{StaticResource ShadeBrushGradient2}"
                      Offset="0" />
        <GradientStop Color="{StaticResource ShadeBrushGradient3}"
                      Offset="0.1" />
        <GradientStop Color="{StaticResource ShadeBrushGradient3}"
                      Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="ShadeBrushTop"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="{StaticResource ShadeBrushGradient2}"
                      Offset="0" />
        <GradientStop Color="{StaticResource ShadeBrushGradient3}"
                      Offset="0.1" />
        <GradientStop Color="{StaticResource ShadeBrushGradient3}"
                      Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="ShadeBrushBottom"
                         EndPoint="0.5,0"
                         StartPoint="0.5,1">
        <GradientStop Color="{StaticResource ShadeBrushGradient2}" />
        <GradientStop Color="{StaticResource ShadeBrushGradient3}"
                      Offset="0.1" />
        <GradientStop Color="{StaticResource ShadeBrushGradient3}"
                      Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="ShadeBrushLeft"
                         EndPoint="1,0.5"
                         StartPoint="0,0.5">
        <GradientStop Color="{StaticResource ShadeBrushGradient2}" />
        <GradientStop Color="{StaticResource ShadeBrushGradient3}"
                      Offset="0.1" />
        <GradientStop Color="{StaticResource ShadeBrushGradient3}"
                      Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="ShadeBrushRight"
                         EndPoint="0,0.5"
                         StartPoint="1,0.5">
        <GradientStop Color="{StaticResource ShadeBrushGradient2}" />
        <GradientStop Color="{StaticResource ShadeBrushGradient3}"
                      Offset="0.1" />
        <GradientStop Color="{StaticResource ShadeBrushGradient3}"
                      Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="DisabledBackgroundBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="#FFFFFFFF" />
        <GradientStop Color="#FF62676A"
                      Offset="1" />
        <GradientStop Color="#FFD1D4D6"
                      Offset="0.41800001263618469" />
        <GradientStop Color="#FFA9AFB5"
                      Offset="0.425" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="SelectedBackgroundBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="{StaticResource SelectedBackgroundGradient1}" />
        <GradientStop Color="{StaticResource SelectedBackgroundGradient2}"
                      Offset="0.38" />
        <GradientStop Color="{StaticResource SelectedBackgroundGradient3}"
                      Offset="0.384" />
        <GradientStop Color="{StaticResource SelectedBackgroundGradient4}"
                      Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="SelectedBackgroundBrushVertical"
                         EndPoint="2.05,0.5"
                         StartPoint="-0.55,0.5">
        <GradientStop Color="{StaticResource SelectedBackgroundGradient1}" />
        <GradientStop Color="{StaticResource SelectedBackgroundGradient2}"
                      Offset="0.37999999523162842" />
        <GradientStop Color="{StaticResource SelectedBackgroundGradient3}"
                      Offset="0.38400000333786011" />
        <GradientStop Color="{StaticResource SelectedBackgroundGradient4}"
                      Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="HorizontalSliderBorderBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="{StaticResource SliderBorderGradient1}" />
        <GradientStop Color="{StaticResource SliderBorderGradient2}"
                      Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="VerticalSliderBorderBrush"
                         EndPoint="1.35,0.5"
                         StartPoint="0.6,0.5">
        <GradientStop Color="{StaticResource SliderBorderGradient1}" />
        <GradientStop Color="{StaticResource SliderBorderGradient2}"
                      Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="WindowBackgroundBrush"
                         EndPoint="0.5,1"
                         StartPoint="0.5,0">
        <GradientStop Color="{StaticResource WindowBackgroundBrushGradient1}" />
        <GradientStop Color="{StaticResource WindowBackgroundBrushGradient2}"
                      Offset="1" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="MouseOverBrush"
                         EndPoint="0,1"
                         StartPoint="0,0">
        <GradientStop Color="#FFF"
                      Offset="0.0" />
        <GradientStop Color="#AAA"
                      Offset="1.0" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="PressedBrush"
                         EndPoint="0,1"
                         StartPoint="0,0">
        <GradientStop Color="#BBB"
                      Offset="0.0" />
        <GradientStop Color="#EEE"
                      Offset="0.1" />
        <GradientStop Color="#EEE"
                      Offset="0.9" />
        <GradientStop Color="#FFF"
                      Offset="1.0" />
    </LinearGradientBrush>
    <LinearGradientBrush x:Key="PressedBorderBrush"
                         EndPoint="0,1"
                         StartPoint="0,0">
        <GradientStop Color="#444"
                      Offset="0.0" />
        <GradientStop Color="#888"
                      Offset="1.0" />
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="LightBrush"
                         EndPoint="0,1"
                         StartPoint="0,0">
        <GradientStop Color="#FFF"
                      Offset="0.0" />
        <GradientStop Color="#EEE"
                      Offset="1.0" />
    </LinearGradientBrush>

    <SolidColorBrush x:Key="DisabledForegroundBrush"
                     Color="#FF636363" />

    <SolidColorBrush x:Key="DisabledBorderBrush"
                     Color="#AAA" />

    <LinearGradientBrush x:Key="DefaultedBorderBrush"
                         EndPoint="0,1"
                         StartPoint="0,0">
        <GradientStop Color="#777"
                      Offset="0.0" />
        <GradientStop Color="#000"
                      Offset="1.0" />
    </LinearGradientBrush>

    <SolidColorBrush x:Key="SolidBorderBrush"
                     Color="#888" />
    <SolidColorBrush x:Key="LightBorderBrush"
                     Color="#AAA" />
    <SolidColorBrush x:Key="LightColorBrush"
                     Color="#DDD" />

    <SolidColorBrush x:Key="GlyphBrush"
                     Color="{StaticResource WhiteColor}" />

</ResourceDictionary>
